<?php


namespace app\zhongmaotong\validate;

use think\Validate;

class XwggValidate extends Validate
{
    //定义验证规则
    protected $rule = [

        'text' => 'require',
        'id' => 'require'
    ];

    //定义验证失败时的提示信息
    protected $message = [


        'text.require' => '文本不能为空',

        'id.require' => 'id不能为空',
        //......
    ];

    //验证场景
    protected $scene = [
        'add' => ['text','url'],
        'edit' => ['text','id'],
    ];

}